home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11535 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  686 b 

  1. From: _GOYRA_@msn.com (David Byrden)
  2. Subject: RE: structs as member of classes
  3. Date: 15 Mar 96 04:37:11 -0800
  4. References: <4i5tod$qhe@news.asu.edu>
  5. Message-ID: <00001a81+0000ad4f@msn.com>
  6. Path: news.msn.com!msn.com
  7. Newsgroups: comp.lang.c++
  8. Organization: The Microsoft Network (msn.com)
  9.  
  10.  
  11. >>I get the error
  12. >>Error: Character::CharPlayer may not be a type name.
  13. >>when trying to change the value in a struct which is a private 
  14. member of a class.
  15.  
  16. >>void Character::init_player()
  17. >>{
  18. >>        CharPlayer.PlrSts.strength = 15;
  19.  
  20.  
  21.     Post the Character class declaration. I think you are using one 
  22. identifier too many in that last statement, but I can't tell which 
  23. one it is.
  24.  
  25.                     David
  26.